We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Get model data when use getModelsManager->executeQuery

Hi all. I am using phalconeye, and in my project, i am used: $sql = "INSERT INTO POST VALUES(...)": $result = $this->getModelsManager()->executeQuery($sql); It return same as:

object(Phalcon\Mvc\Model\Query\Status)[1452] protected '_success' => boolean true protected '_model' => object(Post\Model\Post)[1451] public 'post_id' => string '251' (length=3) public 'category_id' => string '1' (length=1) ....

How to i can get that Post model data (get post_id, category_id...)

Thanks for every help. (Sorry for my English).



58.4k

I don't understand your question, you can put Vietname forum here https://forum.zphalcon.com/ maybe I will help you :)

I have done, use: $result->getModel(); Thanks!.